package model.keyboard 
{
	import flash.ui.Keyboard;
	/**
	 * ...
	 * @author Yang Wang
	 */
	public class KeyMap 
	{
		
		private var m_map:Object;
		
		public function KeyMap() 
		{
			m_map = new Object();
			setDefault();
		}
		
		public function setDefault() : void {
			m_map = {
				pause 		: Keyboard.ESCAPE,
				rotateLeft 	: Keyboard.UP,
				rotateRight	: Keyboard.Z,
				softDrop	: Keyboard.DOWN,
				hardDrop	: Keyboard.SPACE,
				moveLeft	: Keyboard.LEFT,
				moveRight	: Keyboard.RIGHT,
				hold		: Keyboard.SHIFT
			};
		}
		
		public function get LeftKey() : uint {
			return m_map.moveLeft;
		}
		
		public function get RightKey() : uint {
			return m_map.moveRight;
		}
		
		public function get PauseKey() : uint {
			return m_map.pause;
		}
		
		public function get RotateLeftKey() : uint {
			return m_map.rotateLeft;
		}
		
		public function get RotateRightKey() : uint {
			return m_map.rotateRight;
		}
		
		public function get SoftDropKey() :uint {
			return m_map.softDrop;
		}
		
		public function get HardDropKey() :uint {
			return m_map.hardDrop;
		}
		
		public function get HoldKey() : uint {
			return m_map.hold;
		}
	}

}